<extend name="./public/frame.html"/>
<block name="content">
    <style>
        blockquote {
            -webkit-margin-end: 0;
        }
        .li_info {
            width: 25%;
            line-height: 24px;
            float: left;
        }
    </style>
    <div class="layui-row layui-col-space15">
        <div class="layui-card">
            <div class="layui-card-header" style="background-color: #F2F2F2;"><b>账户信息</b></div>
            <div class="layui-card-body" style="height: 50px;">
                <div>
                    <ul>
                        <li class="li_info">用户手机号码：<span>{$info['user_phone']}</span></li>
                        <li class="li_info">可用余额（元）：<span>{$info['available_money']}</span></li>
                        <br/>
                        <li class="li_info">可提现余额（元）：<span>{$info['wallet_money']}</span></li>
                        <li class="li_info">不可提现余额（元）：<span>{$info['return_money']}</span></li>
                        <li class="li_info">赠送余额（元）：<span>{$info['gifts_money']}</span></li>
                        <li class="li_info">冻结中（元）：<span>{$info['frozen_money']}</span></li>
                    </ul>
                </div>
            </div>
        </div>
    </div>
    <div class="layui-card">
        <div class="layui-card-header" style="background-color: #F2F2F2;"><b>钱包明细</b></div>
    </div>
    <style type="text/css">
        blockquote {
            -webkit-margin-end: 0px;
        }
    </style>
    <blockquote class="layui-elem-quote search">
        <div class="layui-inline">
            <select id="money_statement" name="money_statement" class="layui-input" lay-filter="money_statement" style="width: 150px;">
                <option value="">流水类型</option>
                <?php foreach($money_statement_list as $key=>$value):?>
                <option value="<?php echo $key;?>"><?php echo $value;?></option>
                <?php endforeach;?>
            </select>
        </div>
        <!--<div class="layui-inline">-->
            <!--<input type="text" name="user_phone" id="user_phone" placeholder="手机号" class="layui-input">-->
        <!--</div>-->
        <div class="layui-inline">
            <input type="text" name="order_sn" id="order_sn" placeholder="订单号" class="layui-input">
        </div>
        <!--<div class="layui-inline">-->
        <!--<select id="time_type" name="time_type" class="layui-input"lay-filter="time_type" style="width: 120px;">-->
        <!--<option value="1">生成时间</option>-->
        <!--<option value="2">注册时间</option>-->
        <!--</select>-->
        <!--</div>-->
        <div class="layui-inline">
            <input type="text" class="layui-input" id="start_time" autocomplete="off" placeholder="记录开始时间">
        </div>
        <div class="layui-inline">
            <input type="text" class="layui-input" id="end_time" autocomplete="off" placeholder="记录结束时间">
        </div>
        <div class="layui-inline">
            <button class="layui-btn" data-type="search">搜索</button>
        </div>
    </blockquote>
    <input type="hidden" id="uid" name="uid" value="{$uid}">
    <table class="layui-table" lay-data="{width:'auto', height:'auto', url:'{:url('Finance/userFlowList')}', where: {uid: {$uid}}, page: true, limit: 10, id:'userFlowList'}" lay-filter="userFlowList">
        <thead>
        <tr>
            <th lay-data="{field:'money_id', width:120,fixed: true, sort: true,align:'center',fixed: true}">流水ID</th>
            <th lay-data="{field:'uid', width:120,align:'center'}">用户ID</th>
            <th lay-data="{field:'money_statement', width:150,align:'center'}">流水类型</th>
            <th lay-data="{field:'out_trade_no', width:200,align:'center'}">单号</th>
            <th lay-data="{field:'flow_money', width:150,align:'center'}">流水金额</th>
            <th lay-data="{field:'return_money', width:150,align:'center'}">不可提现金额</th>
            <th lay-data="{field:'money', width:150,align:'center'}">可提现金额</th>
            <th lay-data="{field:'gifts_money', width:150,align:'center'}">赠送金额</th>
            <!--<th lay-data="{field:'wallet_money', width:150,align:'center'}">当前余额</th>-->
            <th lay-data="{field:'time', width:198,align:'center'}">记录时间</th>
        </tr>
        </thead>
    </table>
    <script>
        // && d.activity_type !=2
        layui.use(['form','table','laydate'], function () {
            var table = layui.table,form = layui.form,laydate = layui.laydate;
            laydate.render({
                elem: '#start_time' //指定元素
            });

            laydate.render({
                elem: '#end_time' //指定元素
            });
            table.on('tool(userFlowList)', function (obj) {
                var data = obj.data;
                var id = data.id;
            });

            //搜索
            $('.layui-btn').on('click', function () {
                var money_statement	= $("#money_statement").val();
                var order_sn 		= $("#order_sn").val();
//				var time_type 		= $("#time_type").val();
                var start_time 		= $("#start_time").val();
                var end_time 		= $("#end_time").val();
//				var role_type		= $("#role_type").val();
                var uid             = $("#uid").val();
                table.reload('userFlowList', {
                    url: '/admin/Finance/userFlowList', where: {
                        "money_statement": money_statement,
                        "order_sn": order_sn,
                        "start_time": start_time,
                        "end_time": end_time,
						"uid":uid,
                    }
                });
            });
        });
    </script>
</block>
